import React,{Component} from 'react';



interface Prop{
    title:Item,
    subTitles?:Item[]
}

interface Item {
    name:string,
    url:string
}

export default class BlockHead extends Component<Prop> {


    render () {
        const {title,subTitles} =this.props;
        return (<div className="block-head ">
            <span className="title title-main"><i className="fa fa-circle-o fa-block"></i> {title.name}</span>
            <span className="title title-sub">
                {subTitles && subTitles.map(subTitle=>(
                    <span className="title-sub-item">{subTitle.name}</span>
                ))}
            </span>
            
            <span className="title title-end">更多</span>
        </div>)
    }
}